package string;
//length():获取字符串的长度
public class LengthDemo {
    public static void main(String[] args) {
        String str="我在学习java!";
        int len=str.length();
        System.out.println(len);

        String str1="看见蟑螂，我不怕不怕啦";
        int len1=str1.length();
        System.out.println(len1);
    }
}
